package com.zw.cloud.mybatis.plus.controller;

import com.zw.cloud.mybatis.plus.service.api.ITcService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import java.util.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zw
 * @since 2022-08-14
 */
@RestController
@RequestMapping("/tc")
@Slf4j
public class TcController {


    @Autowired
    private ITcService tcService;


    @GetMapping("/queryTcList/{count}")
    //http://localhost:8080/tc/queryTcList/5
    public Map<String,List<Integer>> queryFcList(@PathVariable("count") Integer count) {
        return tcService.queryFcList(count);
    }

    @GetMapping(value = {"/sendTcMsg/{count}"})
    //http://localhost:8082/tc/sendTcMsg/10
    public void sendTcMsg(@PathVariable("count") Integer count) {
        tcService.sendTcMsg(count);
    }

}
